<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>计算机属性computed</title>
</head>
<body>
    <div id="example-1">
        <p>a = {{a}}</p>
        <p>b = {{b}}</p>
    </div>


<script src="../lib/vue.js"></script>
<script>
    var exampleVm = new Vue({
        el : "#example-1",
        data : {
            a : 1,
        },
        computed : {
            b : function(){
                return this.a + 1;
            }
        }
    })
</script>
</body>
</html>